ARM64: Display method names for indirect calls in JitDisasm output#126000
Merged
ARM64: Display method names for indirect calls in JitDisasm output#126000
Conversation
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
…ail) In the IF_BR_1B case of emitDispInsHelp, after displaying the register, check if idMemCookie is set and display the method name as a comment. This matches x64 behavior where indirect calls show the target method name. Also add a small FileCheck test for ARM64 specifically. Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/b2a47cb3-cb3d-4479-a881-733d20b8576b
Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/b2a47cb3-cb3d-4479-a881-733d20b8576b
Copilot
AI
changed the title
[WIP] Fix JIT release to include function names for calls on arm64
ARM64: Display method names for indirect calls in JitDisasm output
Mar 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates ARM64 JitDisasm output so indirect calls (blr / br_tail) include a method-name annotation comment, matching the existing behavior on other architectures. It also adds an ARM64 FileCheck-based JIT test to prevent regressions.
Changes:
- ARM64: For
IF_BR_1Binstruction display, print the method name fromidMemCookieas a//comment for indirect calls. - Tests: Add a new ARM64 disasm FileCheck test validating
blrlines include the target method name annotation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/coreclr/jit/emitarm64.cpp | Adds method-name comment emission for IF_BR_1B (indirect branch/call register format) when idMemCookie is present. |
| src/tests/JIT/opt/Calls/IndirectCallAnnotation.csproj | New JIT disasm/FileCheck-enabled test project configuration. |
| src/tests/JIT/opt/Calls/IndirectCallAnnotation.cs | New test that forces a virtual call and checks ARM64 disasm contains the callee method name on the blr instruction line. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jakobbotsch
reviewed
Mar 24, 2026
jakobbotsch
reviewed
Mar 24, 2026
Member
|
@copilot address the feedback. |
Use emitDispCommentForHandle instead of directly calling eeGetMethodFullName and printf, matching the pattern used by movz/movk constant annotations. Remove the FileCheck test since it would only run in checked mode where the method name already appears on the movz/movk constant instructions. Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/84a22a2e-9c3e-40ef-ab3b-97113c002f92
Contributor
Author
This was referenced Mar 24, 2026
Member
|
PTAL @dotnet/jit-contrib fix for JitDisasm |
Member
|
PTAL @jakobbotsch |
jakobbotsch
approved these changes
Mar 30, 2026
Member
|
/ba-g "System.Formats.Nrbf.Tests timeout" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ARM64
JitDisasmoutput for indirect calls (blr/br_tail) was missing method name annotations. On x64, indirect calls render ascall [addr] ; MethodName, but on ARM64 the equivalentblr x2had no function name comment.The method handle is already stored in
idMemCookiefor all call types. TheIF_BR_1Bdisplay case inemitDispInsHelpsimply never read it.Before:
blr x2After:
Changes
src/coreclr/jit/emitarm64.cpp: In theIF_BR_1Bcase ofemitDispInsHelp, callemitDispCommentForHandlewithGTF_ICON_FTN_ADDRto display the method name — matching the format used bymovz/movkconstant annotations in checked builds and the convention used by other architectures.Original prompt
JitDisasmdoes not include function names for calls on arm64 #125951💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.